import React, { useState, useEffect,useContext } from 'react';
import { Layout, Icon, Form, Button, Card,Input,message,Switch,Select } from 'antd'
const {Option } = Select

export default function(props) {
  const {count, setCount } = props;
  console.log(count)
  const [showCard, setShowCard] = useState(false);

  const [month, setMonth] = useState("");
  

  return (
    <div >   
      <h3>子组件 child  </h3> 
      <Button onClick={()=>{ 
         console.log(count)    // 子组件用父组件数据 计算或者显示
         setCount ( count+1)   // 子组件调用父组件方法
        }}>count++</Button> 
     
    </div>
  );
}
